proc pub_topic {nick chan botnet host} {
  global botnick home bcast

  if {![botisop $chan]} {
    putquick "NOTICE $nick :\0034ERROR - Bot dosen't have op status (+o) in $chan"
    return 0	
  } elseif {$botnet == ""} {
    set topic ""
    putlog "!$nick ($host)! topic $chan ''"
    putquick "NOTICE $nick :\0033Sucessfully set topic to '' on\0034 $chan"

    if {$bcast == "1"} {
      putquick "PRIVMSG $home :\002$nick\002 ($host) removed topic for $chan"
    }

    putquick "TOPIC $chan :$topic"
    return 0
  }

  putlog "!$nick ($host)! topic $chan $botnet"
  putquick "TOPIC $chan :$botnet"
  putquick "NOTICE $nick :\0033Sucessfully set topic to '\003$botnet\0033' on \0034$chan"

  if {$bcast == "1"} {
    putquick "PRIVMSG $home :\002$nick\002 ($host) set topic for $chan to: $botnet"
  }

  return 0
}










